<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>user</title>
<link rel="stylesheet" type="text/css" href="styles/common.css">
</head>
<body>
	<div id="" class="nav">
		<a class="navactive" href="#">借阅信息</a>
		<a href="usersearchbook">检索图书</a>
		<p>用户名：{{$UserInfo['username']}} 学号：{{$UserInfo['userid']}}</p>
	</div>
	<h2>欢迎 {{$UserInfo['realname']}} 同学！</h2>
	<table class="tab" id="">
		<tbody>
  			<tr>
    	 		<th>书的id</th>
     	 		<th>书的名字</th>
     	 		<th>作者</th>
     	 		<th>书的出版社</th>
      			<th>借书日期</th>
     	 		<th>还书日期</th>
      			<th>操作</th>
    		</tr>
			@foreach($borrowInfo as $value)
			<tr>
    			<td>{{$value['bookid']}}</td>
		     	<td>《{{$bookInfo[$value['bookid']]['bookname']}}》</td>
			    <td>{{$bookInfo[$value['bookid']]['author']}}</td>
			    <td>{{$bookInfo[$value['bookid']]['press']}}</td>
			    <td>{{date('Y-m-d',$value['borrowdate'])}}</td>
			    <td>{{date('Y-m-d',$value['rentdate'])}}</td>
      			<td>
					@if($value['last'] == 1)
						<a href="#" class="last" value="{{$value['borrowid']}}">续借</a>
					@endif
					@if($value['rentdate']>=time())
						<a href="#" class="rent" value="{{$value['borrowid']}}" about="{{$value['bookid']}}">
							归还
						</a>
					@endif
				</td>
   			</tr>
			@endforeach
		</tbody>
	</table>


</body>
<script src="script/jquery-3.1.1.min.js"></script>
<script src="script/user.js"></script>
</html>